package com.jsu.exhibitor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.model.exhibitor.pojos.Exhibitor;
import org.example.model.user.pojo.User;

import java.util.List;

@Mapper
public interface ExhibitorMapper extends BaseMapper<Exhibitor> {

    @Select("SELECT * FROM exhibitor WHERE brand LIKE CONCAT('%', #{keyword}, '%') " +
            "OR product_info LIKE CONCAT('%', #{keyword}, '%')")
    List<Exhibitor> searchExhibitorsByKeyword(@Param("keyword") String keyword);
}
